/* 
 * File:   graph.h
 * Author: jorisgirardot
 *
 * Created on 17 novembre 2012, 16:31
 */

#ifndef GRAPH_H
#define	GRAPH_H

#include <stdio.h>
#include <stdlib.h>
#include "utils.h";
#include "matrix.h";
#include "list.h";


#define TRUE 1
#define FALSE 0

typedef struct Graph Graph;
struct Graph
{
    int nodes, vertices; // Nombre de sommets et d'arêtes
    int directed;
    char **nodesName;
    Matrix adjacency;
};

int graph_addVertex(int nodeA, int nodeB, Graph *graph);
int graph_removeVertex(int nodeA, int nodeB, Graph *graph);

int graph_addNode(Graph *graph);
int graph_removeNode(int node, Graph *graph);

void graph_printGraphInfo(Graph *graph);
void graph_printNodesNames(Graph *graph);

// Retourne une matrice d'adjacence après l'algorithme de Warshall
Matrix graph_Warshall(Graph graph);
void graph_BFS(int** adj,int *visited,int start, int size);

void graph_DFS(int **a,int n,int *s,int u,int *q, int r);
void printDFS(int **a,int n,int *q);


void readCSVFile(char *fileName, Graph *graph);

void generateRandomMatrix(Graph *graph);
#endif	/* GRAPH_H */

